import BaseEndpoint from '../../Base/endpoint'
import CreateIntNode from './CreateIntNode'
import { v4 as uuidv4 } from 'uuid'

class CreateBooleanNode extends CreateIntNode {
  [x: string]: any
  constructor(opts) {
    opts.nodeType = 'CREATE_BOOLEAN'
    opts.text = '变量布尔值'
    //设置连接点
    opts.endpoints = opts.endpoints || [
      {
        id: uuidv4(),
        type: 'source',
        scope: 'entity',
        pointType: 'output',
        dataKey: 'entity',
        orientation: [1, 0],
        pos: [1, 0.31],
        title: '输出值（实体）',
        Class: BaseEndpoint
      },
      {
        id: uuidv4(),
        type: 'source',
        pointType: 'output',
        scope: 'boolean',
        dataKey: 'boolean',
        orientation: [1, 0],
        pos: [1, 0.4],
        title: '输出值（布尔）',
        Class: BaseEndpoint
      }
    ]
    super(opts)
  }
}
export default CreateBooleanNode
